package string;

public class StringBuilderDemo {
    public static void main(String[] args) {
        StringBuilder stringBuilder = new StringBuilder("好好学习java");
        stringBuilder.append("，天天向上");
        System.out.println(stringBuilder);
        String s = stringBuilder.toString();
        System.out.println(s);
        stringBuilder.replace(9, 11, "日日");
        System.out.println(stringBuilder);
        stringBuilder.delete(10, 12);
        System.out.println(stringBuilder);
        stringBuilder.insert(10, "好");
        System.out.println(stringBuilder);
        stringBuilder.reverse();
        System.out.println(stringBuilder);
        stringBuilder.append("，天天向上").replace(0, 9, "好好学习java").replace(9, 11, "日日").delete(10, 12).insert(10, "好");
        System.out.println(stringBuilder);
        String s1 = String.valueOf('c');
        String s2 = String.valueOf(new char[]{'a','b','c'});
        System.out.println(s1);
        System.out.println(s2);

    }
}
